/**
 * Created with hong.rong
 * Date:2020/07/04
 */

import request from '@/utils/request'

/**
 * 获取类目接口
 * @param data
 * @returns {Promise<*>}
 */
export async function getCategoryList(data = {}) {
  return request.post('/admin/cate/list', data)
}

/**
 * 根据层级和pid获取类目
 * @param data
 * @returns {Promise<*>}
 */
export async function getListLevel(data = {}) {
  return request.post('/admin/cate/listLevel', data)
}

/**
 * 新增修改类目
 * @param data
 * @returns {Promise<*>}
 */
export async function categoryModify(data = {}) {
  return request.post('/admin/cate/modify', data)
}
